package com.huiqiao.stat.service.impl;

import com.huiqiao.bus.service.ICustomerService;
import com.huiqiao.stat.domain.BaseEntity;
import com.huiqiao.stat.mapper.StatMapper;
import com.huiqiao.stat.service.StatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: yanliwei@foolish
 * @CreateTime: 2024-12-25  09:29
 */
@Service
@Transactional //事务控制
public class StatServiceImpl implements StatService {

    @Autowired
    private StatMapper statMapper;

    @Autowired
    private ICustomerService customerMapper;


    @Override
    public List<BaseEntity> loadCustomerAreaStatList() {
        //重写sql语句
        return statMapper.queryCustomerAreaStat();

    }

    @Override
    public List<BaseEntity> loadOpernameYearGradeStatList(String year) {
        return statMapper.queryOpernameYearGradeStat(year);
    }

    @Override
    public List<Double> loadCompanyYearGradeStatList(String year) {
        return statMapper.queryCompanyYearGradeStat(year);
    }


}
